class Test{
public static void main(String[] args){


	//Date : 1/8/13

	Calculator cal = new Calculator();

	System.out.println("Default value of boolean is : " + cal.bln);
	System.out.println("Default value of byte is : " + cal.b);
	System.out.println("Default value of short is : " + cal.s);
	System.out.println("Default value of int is : " + cal.i);
	System.out.println("Default value of long is : " + cal.l);
	System.out.println("Default value of float is : " + cal.f);
	System.out.println("Default value of double is : " + cal.d);
	System.out.println("Default value of String : " + cal.str);
	
	// Creating object of employee class
	employee emp1 = new employee();
	employee emp2 = new employee();
	employee emp3 = new employee();
	employee emp4 = new employee();
	employee emp5 = new employee();
	
	//initializing values for object emp1
	emp1.id = 1;
	emp1.name="Ranveersinh";
	emp1.address="Malad, Mumbai";
	emp1.gender = "Male";
	emp1.sal = 10002541.23;
	
	//	Printing values of emp1
	System.out.println("Employee 1 Details : ");
	System.out.println("emp1 ID : " + emp1.id);
	System.out.println("emp1 name : " + emp1.name);
	System.out.println("emp1 address : " + emp1.address);
	System.out.println("emp1 gender : " + emp1.gender);
	System.out.println("emp1 sal : " + emp1.sal + "\n");

	//initializing values for object emp2
	emp2.id = 2;
	emp2.name="Rajveersinh";
	emp2.address="Ahmedabad, Gujarat";
	emp2.gender = "Male";
	emp2.sal = 200002541.23;

	//	Printing values of emp2
	System.out.println("Employee 2 Details : ");
	System.out.println("emp2 ID : " + emp2.id);
	System.out.println("emp2 name : " + emp2.name);
	System.out.println("emp2 address : " + emp2.address);
	System.out.println("emp2 gender : " + emp2.gender);
	System.out.println("emp2 sal : " + emp2.sal + "\n");

	//initializing values for object emp3
	emp3.id = 3;
	emp3.name="Neshma";
	emp3.address="Udaipur, rajasthan";
	emp3.gender = "Feale";
	emp3.sal = 100541.23;

	//	Printing values of emp3
	System.out.println("Employee 3 Details : ");
	System.out.println("emp3 ID : " + emp3.id);
	System.out.println("emp3 name : " + emp3.name);
	System.out.println("emp3 address : " + emp3.address);
	System.out.println("emp3 gender : " + emp3.gender);
	System.out.println("emp3 sal : " + emp3.sal + "\n");

	//initializing values for object emp4
	emp4.id = 4;
	emp4.name="Rohan";
	emp4.address="Dadar, Mumbai";
	emp4.gender = "Male";
	emp4.sal = 12541.23;

	//	Printing values of emp4
	System.out.println("Employee 4 Details : ");
	System.out.println("emp4 ID : " + emp4.id);
	System.out.println("emp4 name : " + emp4.name);
	System.out.println("emp4 address : " + emp4.address);
	System.out.println("emp4 gender : " + emp4.gender);
	System.out.println("emp4 sal : " + emp4.sal + "\n");

	//initializing values for object emp5
	emp5.id = 5;
	emp5.name="Rajshree";
	emp5.address="Juhu, Mumbai";
	emp5.gender = "Female";
	emp5.sal = 22541.23;
	
	//	Printing values of emp5
	System.out.println("Employee 5 Details : ");
	System.out.println("emp5 ID : " + emp5.id);
	System.out.println("emp5 name : " + emp5.name);
	System.out.println("emp5 address : " + emp5.address);
	System.out.println("emp5 gender : " + emp5.gender);
	System.out.println("emp5 sal : " + emp5.sal + "\n");



// Date : 31/7/13


	int[][] matrix1 = Calculator.generateRandomIntMatrix(3,3);
	int[][] matrix2 = Calculator.generateRandomIntMatrix(3,3);

	System.out.println("MATRIX1: \n");
	Calculator.printIntMultiDimensionalArray(matrix1);
	System.out.println();
	
	System.out.println("MATRIX2: \n");
	Calculator.printIntMultiDimensionalArray(matrix2);
	System.out.println("\n\n");

	System.out.println("\nSum of all elements in matrix1");
	int totalOfAllElements = Calculator.sumOfAllElements(matrix1);
	System.out.println(totalOfAllElements);
	System.out.println("\n");

	System.out.println("Sum of row elements in matrix1");
	int totalOfRow = Calculator.sumOfRowElements(matrix1);


	System.out.println("\n\nAddition of Matrix1 and Matrix2");
	Calculator.addTwoMatrix(matrix1,matrix2);
	System.out.println("\n\n");

	System.out.println("Multiplication of Matrix1 and Matrix2");
	int[][] result= Calculator.multiplyTwoMatrix(matrix1,matrix2);
	Calculator.printIntMultiDimensionalArray(result);



// Date : 30/7/13


	String str="hi how are you?";
	//String rvrc=Calculator.Reverse(str);
	//System.out.println(rvrc);

	//String rvrc=Calculator.reverseString(str);
	//System.out.println(rvrc);

	Calculator.fibonacci(10);
	Calculator.isEven(10,40);
	Calculator.isOdd(10,40);
	//Calculator.isPrime(40);

	int limit=40;
	System.out.println("\n\nPrinting prime number from 1 to " + limit +"\n\n");
    for(int i = 2; i<=limit; i++){
          //print prime numbers only
		  
          if(Calculator.isPrime2(i)){
              System.out.print(i + " ");
          }
    }

	int[] array=  Calculator.generateRandomIntArray(8);
	Calculator.printIntArray(array);
	
	int total = Calculator.sumOfAllElementsInArray(array);
	System.out.println("\n" + total);
	
	double[] array1=  Calculator.generateRandomDoubleArray(8);
	Calculator.printDoubleArray(array1);

	char[] array2=  Calculator.generateRandomCharArray(8);
	Calculator.printCharArray(array2);

	int max = Calculator.maxNoInArray(array);
	System.out.println("\n\n Maximum number in an int array is : "+max);

	int[] array4=  Calculator.generateRandomIntArray(8);
	Calculator.printIntArray(array4);

	int[] reverse = Calculator.reverseIntArray(array4);
	Calculator.printIntArray(reverse);

	int noOfVowels=  Calculator.countVowels(array2);
	System.out.println("There are "+ noOfVowels +" Vowels in array");




// Date : 29/7/13

	// Converting String to Int Numbers
	String empID="1";
	int intValue= Integer.parseInt(empID);
	System.out.println(empID);

	// Converting String to Double Numbers
	String Salary="100235.25";
	double doubleValue= Double.parseDouble(Salary);
	System.out.println(doubleValue);

	// Switch without breaks..
	char ch='b';
	switch(ch){
		case 'a': System.out.println(ch);
		case 'b': System.out.println(ch);
		case 'c': System.out.println(ch);
	}

	boolean year=Calculator.LeapYear(2012);
	boolean eo=Calculator.EvenOdd(40);
	boolean prime=Calculator.isPrime(30);
	Calculator.rept(10);
	Calculator.Even(10);
	Calculator.isOdd(10);
	Calculator.isMax(10,20);
	Calculator.isLargestPrime(9223372036854775807L);

	

//Date : 26/7/13


	final double PI=3.14159;
	double r=10;
	double area;

	area= r*r*PI;

	System.out.print("The Area for the circle of radius " +r+ " is: " +area);

	int a=20;
	int b=25;
	int sum;

	sum=a+b;

	System.out.print("\n Addition of numbers " +a+ " and " +b+ " is: " +sum);

	int c=15;

	sum=sum+c;

	System.out.println("\n Addition of three numbers " +a+ " and " +b+ " and " +c+" is: " +sum);

	System.out.println( 1.0-0.1-0.1-0.1-0.1-0.1);

	System.out.println("1.0/3.0 is " + 1.0/3.0);

	System.out.println("1.0F/3.0F is " + 1.0F/3.0F);

	System.out.println("***** Fahrenheit To Celsius*****");

	double f=120;
	double cel= ((5.0/9)*(f-32));

	System.out.println(f+" Fahrenheit = " +cel+ " Celsius");

	System.out.println("***** Type conversion*****");

	byte by=60;
	int i= by+100;
	double d= (i*by)/5;

	System.out.println("Byte by = " +by+ "\n Int i = " +i+ " \n Double d = " +d);

	System.out.println("***** Type Casting *****");

	int ab=130;
	double db= 125.22;
	byte bt= (byte) ab;
	float ft= (float) db;

	System.out.println("Byte bt = " +bt);
	System.out.println("Float ft = " +ft);

	char strg='A';
	char nc= '4';
	char hexa= (char)0XAB0065 ;
	char zx= (char) 82.25;
	
	System.out.println("char strg = " +strg);
	System.out.println("char nc = " +nc);
	System.out.println("char hexa = " +hexa);
	System.out.println("char zx = " +zx);

	System.out.println("***** Arithmetic Expressions *****");

	int x=5;
	int y=10;
	double sol;

	sol= ((3+(4*x))/5)-((10*(y-5)*(x+y))/x)-9*((4/x)+(9+x))/y;

	System.out.println(sol);

	
	
//Date : 25/7/13

	System.out.print("This is my first JAVA program..");
}
}